package com.aegis.common.enums;

import com.aegis.common.base.BaseValueEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author renogo
 *
 * @Version 1.0
 */
@Getter
@AllArgsConstructor
public enum CommonStatusValueEnum implements BaseValueEnum<Integer> {

    /**
     * 可用的
     */
    ENABLE(0, "可用"),
    /**
     * 不可用的
     */
    DISABLE(1, "不可用"),
    ;

    private final Integer value;
    private final String desc;


    public static CommonStatusValueEnum fromValue(Integer value) {
        for (CommonStatusValueEnum commonStatusEnum : values()) {
            if (commonStatusEnum.value.equals(value)) {
                return commonStatusEnum;
            }
        }
        return null;
    }

}
